#include "iewebbrowser2.h"

CIWebBrowser2Impl::CIWebBrowser2Impl()
{
	m_dwRef = 0;

}
CIWebBrowser2Impl::~CIWebBrowser2Impl()
{

}
//IUnknown
//////////////////////////////////////////////////////////////////////////////
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::QueryInterface(
	/* [in] */ REFIID riid,
	/* [iid_is][out] */ _COM_Outptr_ void __RPC_FAR *__RPC_FAR *ppvObject)
{
	return S_OK;
}
ULONG STDMETHODCALLTYPE CIWebBrowser2Impl::AddRef(void)
{
	atomicadd(&m_dwRef);
	return m_dwRef;
}
ULONG STDMETHODCALLTYPE CIWebBrowser2Impl::Release(void)
{
	atomicdel(&m_dwRef);
	return m_dwRef;
}
//IServiceProvider
//////////////////////////////////////////////////////////////////////////////
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::QueryService(
	/* [in] */ _In_ REFGUID guidService,
	/* [in] */ _In_ REFIID riid,
	/* [out] */ _Outptr_ void __RPC_FAR *__RPC_FAR *ppvObject)
{
	if (guidService == SID_SInternetSecurityManager && riid == IID_IInternetSecurityManager) {
		*ppvObject = this;
		return S_OK;
	}
	return S_OK;
}

//IOleCommandTarget
//////////////////////////////////////////////////////////////////////////////
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::QueryStatus(
	/* [unique][in] */ __RPC__in_opt const GUID *pguidCmdGroup,
	/* [in] */ ULONG cCmds,
	/* [out][in][size_is] */ __RPC__inout_ecount_full(cCmds) OLECMD prgCmds[],
	/* [unique][out][in] */ __RPC__inout_opt OLECMDTEXT *pCmdText)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::Exec(
	/* [unique][in] */ __RPC__in_opt const GUID *pguidCmdGroup,
	/* [in] */ DWORD nCmdID,
	/* [in] */ DWORD nCmdexecopt,
	/* [unique][in] */ __RPC__in_opt VARIANT *pvaIn,
	/* [unique][out][in] */ __RPC__inout_opt VARIANT *pvaOut)
{
	return S_OK;
}
//IInternetSecurityManager
//////////////////////////////////////////////////////////////////////////////
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::SetSecuritySite(
	/* [unique][in] */ __RPC__in_opt IInternetSecurityMgrSite *pSite)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::GetSecuritySite(
	/* [out] */ __RPC__deref_out_opt IInternetSecurityMgrSite **ppSite)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::MapUrlToZone(
	/* [in] */ __RPC__in LPCWSTR pwszUrl,
	/* [out] */ __RPC__out DWORD *pdwZone,
	/* [in] */ DWORD dwFlags)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::GetSecurityId(
	/* [annotation][in] */
	_In_  LPCWSTR pwszUrl,
	/* [annotation][size_is][out] */
	_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId)  BYTE *pbSecurityId,
	/* [annotation][out][in] */
	_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID))  DWORD *pcbSecurityId,
	/* [annotation][in] */
	_In_  DWORD_PTR dwReserved)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::ProcessUrlAction(
	/* [in] */ __RPC__in LPCWSTR pwszUrl,
	/* [in] */ DWORD dwAction,
	/* [size_is][out] */ __RPC__out_ecount_full(cbPolicy) BYTE *pPolicy,
	/* [in] */ DWORD cbPolicy,
	/* [unique][in] */ __RPC__in_opt BYTE *pContext,
	/* [in] */ DWORD cbContext,
	/* [in] */ DWORD dwFlags,
	/* [in] */ DWORD dwReserved)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::QueryCustomPolicy(
	/* [in] */ __RPC__in LPCWSTR pwszUrl,
	/* [in] */ __RPC__in REFGUID guidKey,
	/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcbPolicy) BYTE **ppPolicy,
	/* [out] */ __RPC__out DWORD *pcbPolicy,
	/* [in] */ __RPC__in BYTE *pContext,
	/* [in] */ DWORD cbContext,
	/* [in] */ DWORD dwReserved)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::SetZoneMapping(
	/* [in] */ DWORD dwZone,
	/* [in] */ __RPC__in LPCWSTR lpszPattern,
	/* [in] */ DWORD dwFlags)
{
	return S_OK;
}
HRESULT STDMETHODCALLTYPE CIWebBrowser2Impl::GetZoneMappings(
	/* [in] */ DWORD dwZone,
	/* [out] */ __RPC__deref_out_opt IEnumString **ppenumString,
	/* [in] */ DWORD dwFlags)
{
	return S_OK;
}
